<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>练习3：画原型链图</title>
	</head>
	<body>
		<div id="nation"></div>
		<div id="skinColor"></div>
		<div id="sex"></div>
	</body>
	<script>
		function Person(nation,skinColor){
			this.nation=nation;
			this.skinColor=skinColor;
		}
		Person.prototype.showNation=function(){
			return this.nation;
		}
		Person.prototype.showSkinColor=function(){
			return this.skinColor;
		}
		function Woman(nation,skinColor,sex){
			Person.call(this,nation,skinColor);
			this.sex=sex;
		}
		Woman.prototype=new Person();
		Woman.prototype.showSex=function(){
			return this.sex;
		}
		var Woman1=new Woman("汉族","黄色","女");
		console.log(Woman1);
		document.getElementById("nation").innerHTML="民族："+Woman1.showNation();
		document.getElementById("skinColor").innerHTML="肤色："+Woman1.showSkinColor();
		document.getElementById("sex").innerHTML="性别："+Woman1.showSex();
	</script>
	
</html>
